package com.platform.dao;

import com.platform.entity.SmsLogVo;
import com.platform.entity.UserVo;
import org.apache.ibatis.annotations.Param;

import java.util.Map;

/**
 * 用户
 *
 * @author lipengjun
 * @email 939961241@qq.com
 * @gitee https://gitee.com/fuyang_lipengjun/platform
 * @date 2017-03-23 15:22:06
 */
public interface ApiUserMapper extends BaseDao<UserVo> {

    UserVo queryByMobile(String mobile);

    UserVo queryByOpenId(@Param("openId") String openId);

    /**
     * 获取用户最后一条短信
     *
     * @param user_id
     * @return
     */
    SmsLogVo querySmsCodeByUserId(@Param("user_id") Long user_id);

    /**
     * 保存短信
     *
     * @param smsLogVo
     * @return
     */
    int saveSmsCodeLog(SmsLogVo smsLogVo);

    /**
     *解析手机号
     * @param map
     * @return
     */
    int updatePhoneNum(Map<String, Object> map);

    /**
     * 更新分销比例
     * @param vo
     * @return
     */
    int updatefx(UserVo vo);

    UserVo detail(@Param("openid")String openid);

    int updateByOpenId(Map<String, Object> paramMap);

    UserVo query(Map<String, Object> id);
}
